/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package fsm.impl;

import fsm.FsmPackage;
import fsm.State;
import fsm.Transition;

import org.eclipse.emf.common.util.EList;

import org.eclipse.emf.ecore.EClass;

import org.eclipse.emf.internal.cdo.CDOObjectImpl;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model object '<em><b>State</b></em>'.
 * <!-- end-user-doc -->
 * <p>
 * The following features are implemented:
 * <ul>
 *   <li>{@link fsm.impl.StateImpl#getName <em>Name</em>}</li>
 *   <li>{@link fsm.impl.StateImpl#getCode <em>Code</em>}</li>
 *   <li>{@link fsm.impl.StateImpl#getOutgoing <em>Outgoing</em>}</li>
 *   <li>{@link fsm.impl.StateImpl#getIncoming <em>Incoming</em>}</li>
 *   <li>{@link fsm.impl.StateImpl#isIsInitialState <em>Is Initial State</em>}</li>
 * </ul>
 * </p>
 *
 * @generated
 */
public class StateImpl extends CDOObjectImpl implements State {
	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected StateImpl() {
		super();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	protected EClass eStaticClass() {
		return FsmPackage.Literals.STATE;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	protected int eStaticFeatureCount() {
		return 0;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getName() {
		return (String)eGet(FsmPackage.Literals.STATE__NAME, true);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setName(String newName) {
		eSet(FsmPackage.Literals.STATE__NAME, newName);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getCode() {
		return (String)eGet(FsmPackage.Literals.STATE__CODE, true);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setCode(String newCode) {
		eSet(FsmPackage.Literals.STATE__CODE, newCode);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@SuppressWarnings("unchecked")
	public EList<Transition> getOutgoing() {
		return (EList<Transition>)eGet(FsmPackage.Literals.STATE__OUTGOING, true);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@SuppressWarnings("unchecked")
	public EList<Transition> getIncoming() {
		return (EList<Transition>)eGet(FsmPackage.Literals.STATE__INCOMING, true);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean isIsInitialState() {
		return (Boolean)eGet(FsmPackage.Literals.STATE__IS_INITIAL_STATE, true);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setIsInitialState(boolean newIsInitialState) {
		eSet(FsmPackage.Literals.STATE__IS_INITIAL_STATE, newIsInitialState);
	}

} //StateImpl
